package ${controllerPackage};

import org.ligson.fwc.core.controller.CrudController;
import org.ligson.fwc.core.service.BaseService;
import ${entityPackage}.${entityName};
import ${servicePackage}.${serviceName};
import ${tableInfo.primaryKey.javaType.name};
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
* Created by ligson on 2017/8/11.
*/
@Controller
@RequestMapping("/${baseName?substring(0,1)?lower_case}${baseName?substring(1)}")
public class ${controllerName} extends CrudController<${entityName}, ${tableInfo.primaryKey.javaType.simpleName}> {

${"    "}@Autowired
${"    "}private ${serviceName} ${serviceName?substring(0,1)?lower_case}${serviceName?substring(1)};

${"    "}@Override
${"    "}public BaseService<${entityName}, ${tableInfo.primaryKey.javaType.simpleName}> getService() {
${"        "}return ${serviceName?substring(0,1)?lower_case}${serviceName?substring(1)};
${"    "}}

${"    "}//<!--用户自定义代码开始-->
${userCustomCode}
${"    "}//<!--用户自定义代码结束-->
}
